package controller

import (
	"fx_swift_forex/internal/service"
	"fx_swift_forex/pkg/code"
	"fx_swift_forex/pkg/internalerrors"
	"github.com/gin-gonic/gin"
	"net/http"
)

// 获取币种
func GetCurrencies(c *gin.Context) {
	result, err := service.NewBalanceSrv().GetCurrencies(c)
	if err != nil {
		code.Fail(c, http.StatusBadRequest, err.(internalerrors.ServiceError).Code, err.(internalerrors.ServiceError).Msg)
		return
	} else {
		code.Success(c, result)
	}
}
